package MyPassage.model;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Passage {
    private StringProperty name;
    private LocalDate dateOfPassage;
    private List<Wagon> wagons;

    public Passage(LocalDate dateOfPassage, String name, List<Wagon> wagons) {
        this.dateOfPassage = dateOfPassage;
        this.name = new SimpleStringProperty(name);
        this.wagons = wagons;
    }

    public LocalDate getDateOfPassage() {
        return dateOfPassage;
    }
    public void setDateOfPassage(LocalDate dateOfPassage) {
        this.dateOfPassage = dateOfPassage;
    }

    public String getName() {
        return name.get();
    }
    public StringProperty nameProperty() {
        return name;
    }
    public void setName(String name) {
        this.name.set(name);
    }

    public List<Wagon> getWagons() {
        return wagons;
    }
    public void setWagons(List<Wagon> wagons) {
        this.wagons = wagons;
    }
}
